#include <iostream>
#include <cstdio>

int main()
{
    //./a.out 1>log.txt 2>err.txt ////把错误代码和正确代码分开打印到不同文件中

    //C
    printf("hello printf -> stdout\n");
    fprintf(stdout,"hello fprintf -> stdout\n");
    fprintf(stderr,"hello fprintf -> stderr\n");

    //C++
    std::cout<<"hello printf -> cout"<<std::endl;
    std::cerr<<"hello printf -> cerr"<<std::endl;
    return 0;
}